*** Settings ***
Documentation    TC09-Round Management AIR-Lock Unlock
Resource    ../../Keywords/Common_Head.robot
Force Tags    P3
Metadata    Author    Joe
Metadata    ID    13562


*** Test Cases ***
TC09-Round Management AIR-Lock Unlock
    Step 1 User Goes To Basic Data Management Tender List
    Step 2 User Goes To Pricing Collaboration Pricing Project
    Step 3 User Selects Row That Project Name Is 20240815 AIR
    Step 4 Select Current Project In Pricing Project Click On
    Step 5 User Clicks Next Round Management Button
    Step 6 Select Current Role As Project Owner
    Step 7 Exchange Role To Country Pricing Manager US
    Step 8 Exchange Role To Country Pricing Manager DE CN N AU US
    Step 9 Exchange The Role To Cluster Head GREATER CHINA AU NZ
    Step 10 Close This Pop up Dialog Click On Unlock Button
    Step 11 Close This Pop up Dialog
    Step 12 Exchange The Role To Region Pricing Manager EUROPE NAM
    Step 13 Close This Pop up Dialog Click On Unlock Button2
    Step 14 Close This Pop up Dialog2
    Step 15 Exchange The Role To Project Owner
    Step 16 Select All
    Step 17 Close The Dialog Check The Dropdown List Of Current
    Step 18 Exchange The Role To Region Pricing Manager EUROPE NAM2
    Step 19 Select All2
    Step 20 Close The Dialog Check The Dropdown List Of Current2
    Step 21 Exchange To Any Of The Role
    Step 22 Exchange Current Role To Project Owner
    Step 23 Click On Close Button
    Step 24 Select This Project Click On Delete Project Button
    Step 25 User Goes To Basic Data Management Tender List2



*** Keywords ***
Step ${step} User Goes To Basic Data Management Tender List
    #************************Step 1******************************
    #  Do:
    #      User goes to Basic Data Management Tender List
    #      Click Create button
    #      Input with following attributes
    #      Tender ID some numbers such as 202408151435001 you can
    #     input with current datetime and some random number to
    #     avoid duplicate validation
    #      Tender Title some value such as Regression Test by
    #     Wendy001
    #      Customer 815 Miele
    #      Mode select all
    #      Level Global
    #      Click on Save button
    #  Expected:
    #      Created successfully with the message Tender has been
    #     added
    #************************************************************
    ${G_TENDERID}    Generate Tender ID
    Set Suite Variable     ${G_TENDERID}
    Login Space
    Create Tender    ${G_TENDERID}    Regress    815    true    true    true

Step ${step} User Goes To Pricing Collaboration Pricing Project
    #************************Step 2******************************
    #  Do:
    #      User goes to Pricing Collaboration Pricing Project
    #      User clicks Create Project button
    #      Input following attributes
    #      Tender ID 20240815 Regression
    #      Mode Air
    #      Deadline to TM current date 10 day
    #      Rate Validity From current date
    #      Rate Validity To current date 100 day
    #      Deputies NATZHANG
    #      Description for regression
    #      Click on Save button
    #  Expected:
    #      A new project is created successfully
    #************************************************************
    ${ValidFrom}    Get Current Date    result_format=%d/%m/%Y
    Set Test Variable    ${ValidFrom}    ${ValidFrom}
    ${DeadLine}    Get Current Date    UTC    +10days    result_format=%d/%m/%Y
    ${ValidTo}    Get Current Date    UTC    +100days    result_format=%d/%m/%Y
    ${PROJECT}    Copy Dictionary    ${PROJECT_PARAM}
    Set To Dictionary    ${PROJECT}    
    ...    TENDER_ID=${G_TENDERID}    TENDER_TITLE=Regress    CUSTOEMR_NAME=Miele    CUSTOMER_LEVEL=Global
    ...   MODE=AIR    DEADLINE_TM_DATE=${DeadLine}    VALID_FROM=${ValidFrom}    VALID_TO=${ValidTo}    DEPUTY=NATZHANG
    Set Test Variable    ${PROJECT}    ${PROJECT}
    Create Project    ${PROJECT}

Step ${step} User Selects Row That Project Name Is 20240815 AIR
    #************************Step 3******************************
    #  Do:
    #      User selects row that project name is 20240815 AIR
    #     Regression
    #      Click on Copy Data
    #      In the pop up dialog input Tender ID with value
    #     2024000001 click on Search button
    #      Select this entry click on Copy Data button and Yes in
    #     pop up window
    #  Expected:
    #      Successfully with messages in pop up window
    #      Tender has been successfully copied from 2024000001 AIR
    #     do not touch me
    #      Please adjust the template and the lanes in Template
    #     Lane Management page if required
    #      After click on OK button
    #      The same message is displayed in Pricing Project page
    #     too
    #************************************************************
    Search Project    ${PROJECT.TENDER_ID}  
    Copy Data    2024000001    AIR    do not touch me

Step ${step} Select Current Project In Pricing Project Click On
    #************************Step 4******************************
    #  Do:
    #      Select current project in pricing project click on
    #     template management button
    #      Click Skip button in Step4 and Yes in the pop up
    #     windown
    #  Expected:
    #      Next Round Management button is enable
    #************************************************************
    Search Project    ${PROJECT.TENDER_ID}  
    Wait Until Search Finished
    Wait For Elements State    ${Project_toolbar_TemplateManagementButton}   enabled    20
    Click    ${Project_toolbar_TemplateManagementButton}
    click    ${Template_SkipSendToGPDButton}
    click    ${SkipSendToGPD_Yes}
    Wait For Elements State    css=[data-ng-click="go2NextStep()"]   enabled    20

Step ${step} User Clicks Next Round Management Button
    #************************Step 5******************************
    #  Do:
    #      User clicks Next round management button
    #      Assign WENDJIAN to each Region start round send
    #     notification
    #      Assign WENDJIAN to each Cluster and Country send
    #     notification
    #      Reopen the round management window check the dropdown
    #     list of current role
    #  Expected:
    #      index php attachments get 8651e05f a372 40e8 8a17
    #     1f2878e9eca1 It displays as
    #************************************************************
    click    css=[data-ng-click="go2NextStep()"]
    Wait Until Search Finished
    Input Deadline In Region Tab    0    0
    Input Deadline In Region Tab    0    1
    Input Deadline In Region Tab    1    0
    CLICK    [data-ng-click="addUserToAssignment()"]
    Round Mgmt Assign User    ${Project_RoundMgmt_Assign_ApacTab}    xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    Round Mgmt Assign User    ${Project_RoundMgmt_Assign_EuropeTab}    xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    Round Mgmt Assign User    ${Project_RoundMgmt_Assign_NamTab}    xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    click    ${Project_RoundMgmt_Assign_SaveButton} 
    click    ${Project_RoundMgmt_StartButton} 
    click    ${Project_RoundMgmt_StartConfirmButton}
    click    ${Project_RoundMgmt_Confirm_SendButton}
    click    ${Project_RoundMgmt_CloseButton}
    close browser
    Set Global Variable    ${USERNAME}    WENDJIAN
    Login Space
    Search Project    ${PROJECT.TENDER_ID}
    Wait Until Search Finished
    Wait Until Keyword Succeeds    10x    500ms    Click    ${Project_toolbar_RoundMgmtButton}
    Wait For Elements State    //div[@ng-click="toggleDropdown()"]
    Click    //div[@ng-click="toggleDropdown()"]
    Click    //div[contains(text(),"Regional Pricing Manager(EUROPE,NAM,APAC)")]    
    Input Deadline In Country Tab   0    0
    Input Deadline In Country Tab    0    1
    Input Deadline In Country Tab    1    0
    Input Deadline In Country Tab    1    1
    click    //a[.='Cluster']
    Input Deadline In Cluster Tab   0    0
    Input Deadline In Cluster Tab    0    1
    Input Deadline In Cluster Tab    1    0
    CLICK    [data-ng-click="addUserToAssignment()"]
    Round Mgmt Assign User    //a[.='AU']   xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    Round Mgmt Assign User    //a[.='CN-N']     xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    Round Mgmt Assign User    //a[.='DE']    xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    Round Mgmt Assign User    //a[.='US']    xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    click    //a[.='Cluster']
    Round Mgmt Assign User    //a[.='Australia & New Zealand']   xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    Round Mgmt Assign User    //a[.='Germany & Switzerland']     xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']
    Round Mgmt Assign User    //a[.='Greater China']    xpath=//div[@data-model='availableItems']//ul//li//b[.='Wendy Jiang (WENDJIAN)']  
    click    ${Project_RoundMgmt_Assign_SaveButton} 
    click    ${Project_RoundMgmt_SendNotifButton}
    click    ${Project_RoundMgmt_Confirm_SendButton}
    Sleep    5
    Click    //div[@ng-click="toggleDropdown()"]
    Click    //div[contains(text(),"Project Owner")]

Step ${step} Select Current Role As Project Owner
    #************************Step 6******************************
    #  Do:
    #      Select current role as Project Owner
    #      Click on Lock button
    #      In the pop up window Select NAM to Lock
    #      Close this window
    #      Check the dropdown list of current role
    #      Check dashboard Region tab Country Cluster tab
    #  Expected:
    #      It displays as
    #      index php attachments get 340b35bb e9ee 4a88 960f
    #     37b1334f4fc2 index php attachments get fa7c935c 3e4e
    #     4d2b 8d06 3a568f649107 index php attachments get
    #     de4a017c a6da 4a51 b4f1 c332b01b3c7a
    #************************************************************
    click    ${Project_RoundMgmt_LockButton}
    click    //a[.='Region']
    click    //div[@class="tab-content"]//div[contains(text(),'NAM')]/..//input
    click    css=[data-ng-click="lock()"]
    click    css=[data-ng-click="$close()"]
    Wait For Elements State     //td[.='US']/..//td[.='Completed']   visible    20
    Click    //div[@ng-click="toggleDropdown()"]
    Wait For Elements State     //div[contains(text(),'Regional Pricing Manager(NAM)')]    visible    20
    click    ${Project_RoundMgmt_CloseButton}

Step ${step} Exchange Role To Country Pricing Manager US
    #************************Step 7******************************
    #  Do:
    #      Exchange role to Country Pricing Manager US
    #  Expected:
    #      No submission button is displayed
    #************************************************************
    Search Project    ${PROJECT.TENDER_ID}
    Wait Until Search Finished
    Wait For Elements State    ${Project_toolbar_RoundMgmtButton}   enabled    20
    Click    ${Project_toolbar_RoundMgmtButton}
    Click    //div[@ng-click="toggleDropdown()"]
    Wait For Elements State     //div[contains(text(),'Country Pricing Manager(US)')]    visible    20
    ${color}    Get Attribute        //div[contains(text(),'Country Pricing Manager(US)')]//span     style
    Should Contain    ${color}     green
    click    //div[contains(text(),'Country Pricing Manager(US)')]
    Wait For Elements State     ${Project_RoundMgmt_SubmissionButton}   detached     20

Step ${step} Exchange Role To Country Pricing Manager DE CN N AU US
    #************************Step 8******************************
    #  Do:
    #      Exchange role to Country Pricing Manager DE CN N AU US
    #      Download IPT
    #      Submission upload the downloaded file submit
    #      Check the dropdown list of current role
    #      Check the dashboard
    #  Expected:
    #      index php attachments get 0b060056 7500 4578 a1c6
    #     bde3d76a10da index php attachments get 73a864c8 6204
    #     40f1 aec0 dba21cf9c1eb
    #************************************************************
    Click    //div[@ng-click="toggleDropdown()"]
    Wait For Elements State     //div[contains(text(),'Country Pricing Manager(US)')]    visible    20
    click    //div[contains(text(),'Country Pricing Manager(DE,CN-N,AU,US)')]
    ${filename}    Download File    ${Project_RoundMgmt_DownloadButton}
    Wait Until Search Finished
    click    ${Project_RoundMgmt_SubmissionButton}
    click    css=[data-ng-change="selectAll(all)"]
    click    ${Project_RoundMgmt_Submit_UploadButton}
     Wait For Elements State   ${upload_addFileButton}     enabled
    Upload File By Selector    ${upload_addFileButton}    ${filename}
    click    [data-ng-click="submitUploads()"]
     Wait For Elements State    //legend[.='Step 3: Submit Charges']/..//span[contains(text(),'SUCCESSFUL')]      visible    20  
     click    [data-ng-click="$close()"]   
    Click    //div[@ng-click="toggleDropdown()"]
    Wait For Elements State     //div[contains(text(),'Country Pricing Manager(US)')]    visible    20
    Sleep    3
    ${color2}    Get Attribute        //div[contains(text(),'Country Pricing Manager(DE)')]//span     style
    Should Contain    ${color2}     green
    ${color3}    Get Attribute        //div[contains(text(),'Country Pricing Manager(CN-N)')]//span     style
    Should Contain    ${color3}     green
    ${color4}    Get Attribute        //div[contains(text(),'Country Pricing Manager(AU)')]//span     style
    Should Contain    ${color4}     green
Step ${step} Exchange The Role To Cluster Head GREATER CHINA AU NZ
    #************************Step 9******************************
    #  Do:
    #      Exchange the role to Cluster Head GREATER CHINA AU NZ
    #     DE CH
    #      Click on Lock button
    #  Expected:
    #      In Country tab No countries listed here
    #      with the message Only unsubmitted countries will be
    #     listed here
    #************************************************************
    Wait For Elements State     //div[contains(text(),'Cluster Head(GREATER CHINA,AU-NZ,DE-CH)')]    visible    20
    click    //div[contains(text(),'Cluster Head(GREATER CHINA,AU-NZ,DE-CH)')]
    click    ${Project_RoundMgmt_LockButton}
    click    //a[.='Country']
    Wait For Elements State    //b[.='Only unsubmitted countries will be listed here.']    visible    20
    
Step ${step} Close This Pop up Dialog Click On Unlock Button
    #************************Step 10******************************
    #  Do:
    #      Close this pop up dialog click on Unlock button
    #  Expected:
    #      In Country tab no US others are all listed
    #      index php attachments get ed48aad1 2a0e 474e 9aca
    #     97bf92b6f119
    #************************************************************
    click    [data-ng-click="$close()"]   
    click    ${Project_RoundMgmt_UnlockButton}
    Sleep    3
    click    //a[.='Country']
    Wait For Elements State    //label[contains(text(),'CN-N')]        visible    20
    Wait For Elements State    //label[contains(text(),'DE')]        visible    20
    Wait For Elements State    //label[contains(text(),'AU')]        visible    20

Step ${step} Close This Pop up Dialog
    #************************Step 11******************************
    #  Do:
    #      Close this pop up dialog
    #      Download IPT
    #      Submission upload the downloaded file submit
    #      Check the dropdown list of current role
    #      Check the dashboard
    #  Expected:
    #      index php attachments get d6245534 28da 478e ac4f
    #     eeb006833891 index php attachments get 74fd7193 981e
    #     415e b20b 6cb016444739
    #************************************************************
    click    [data-ng-click="$close()"]   
    ${filename}    Download File    ${Project_RoundMgmt_DownloadButton}
    Wait Until Search Finished
    click    ${Project_RoundMgmt_SubmissionButton}
    click    css=[data-ng-change="selectAll(all)"]
    click    ${Project_RoundMgmt_Submit_UploadButton}
     Wait For Elements State   ${upload_addFileButton}     enabled
    Upload File By Selector    ${upload_addFileButton}    ${filename}
    click    [data-ng-click="submitUploads()"]
     Wait For Elements State    //legend[.='Step 3: Submit Charges']/..//span[contains(text(),'SUCCESSFUL')]      visible    20  
     click    [data-ng-click="$close()"]   
    Click    //div[@ng-click="toggleDropdown()"]
    Wait For Elements State     //div[contains(text(),'Country Pricing Manager(US)')]    visible    20
    Sleep    3
    ${color2}    Get Attribute        //div[contains(text(),'Cluster Head(GREATER CHINA)')]//span     style
    Should Contain    ${color2}     green
    ${color3}    Get Attribute        //div[contains(text(),'Cluster Head(AU-NZ)')]//span     style
    Should Contain    ${color3}     green
    ${color4}    Get Attribute        //div[contains(text(),'Cluster Head(DE-CH)')]//span     style
    Should Contain    ${color4}     green

Step ${step} Exchange The Role To Region Pricing Manager EUROPE NAM
    #************************Step 12******************************
    #  Do:
    #      Exchange the role to Region Pricing Manager EUROPE NAM
    #     APAC
    #      Click on Lock button
    #  Expected:
    #      In Country tab No countries listed here
    #      with the message Only unsubmitted countries will be
    #     listed here
    #************************************************************
    Wait For Elements State     //div[contains(text(),'Regional Pricing Manager(EUROPE,NAM,APAC)')]    visible    20
    click    //div[contains(text(),'Regional Pricing Manager(EUROPE,NAM,APAC)')]
    click    ${Project_RoundMgmt_LockButton}
    click    //a[.='Country']
    Wait For Elements State    //b[.='Only unsubmitted countries will be listed here.']    visible    20

Step ${step} Close This Pop up Dialog Click On Unlock Button2
    #************************Step 13******************************
    #  Do:
    #      Close this pop up dialog click on Unlock button
    #  Expected:
    #      In Country tab no US others are all listed
    #      index php attachments get 8702b874 75bb 484f b0a3
    #     244b14e1b1d7
    #************************************************************
    click    [data-ng-click="$close()"]   
    click    ${Project_RoundMgmt_UnlockButton}
    Sleep    3
    click    //a[.='Country']
    Wait For Elements State    //label[contains(text(),'CN-N')]        visible    20
    Wait For Elements State    //label[contains(text(),'DE')]        visible    20
    Wait For Elements State    //label[contains(text(),'AU')]        visible    20

Step ${step} Close This Pop up Dialog2
    #************************Step 14******************************
    #  Do:
    #      Close this pop up dialog
    #      Download IPT
    #      Submission upload the downloaded file submit
    #      Check the dropdown list of current role
    #      Check the dashboard
    #  Expected:
    #      index php attachments get d4e63923 6827 4bab a94c
    #     10a2d6e59dbc index php attachments get e7356b5f b24e
    #     42cc 976c ce06625ce297
    #************************************************************
    click    [data-ng-click="$close()"]   
    ${filename}    Download File    ${Project_RoundMgmt_DownloadButton}
    Wait Until Search Finished
    click    ${Project_RoundMgmt_SubmissionButton}
    click    css=[data-ng-change="selectAll(all)"]
    click    ${Project_RoundMgmt_Submit_UploadButton}
     Wait For Elements State   ${upload_addFileButton}     enabled
    Upload File By Selector    ${upload_addFileButton}    ${filename}
    click    [data-ng-click="submitUploads()"]
     Wait For Elements State    //legend[.='Step 3: Submit Charges']/..//span[contains(text(),'SUCCESSFUL')]      visible    20  
     click    [data-ng-click="$close()"]   
    Click    //div[@ng-click="toggleDropdown()"]
    Wait For Elements State     //div[contains(text(),'Regional Pricing Manager(EUROPE,NAM,APAC)')]    visible    20
    Sleep    3
    ${color2}    Get Attribute        //div[contains(text(),'Regional Pricing Manager(EUROPE)')]//span     style
    Should Contain    ${color2}     green
    ${color3}    Get Attribute        //div[contains(text(),'Regional Pricing Manager(NAM)')]//span     style
    Should Contain    ${color3}     green
    ${color4}    Get Attribute        //div[contains(text(),'Regional Pricing Manager(APAC)')]//span     style
    Should Contain    ${color4}     green

Step ${step} Exchange The Role To Project Owner
    #************************Step 15******************************
    #  Do:
    #      Exchange the role to Project Owner
    #      Click on Unlock button
    #  Expected:
    #      All the regions are listed here
    #************************************************************
    Click    //div[contains(text(),'Project Owner')]
    click    ${Project_RoundMgmt_UnlockButton}
    Sleep    3
    click    //a[.='Region']
    Wait For Elements State    //div[contains(text(),'APAC')]        visible    20
    Wait For Elements State    //div[contains(text(),'EUROPE')]        visible    20
    Wait For Elements State    //div[contains(text(),'NAM')]        visible    20
Step ${step} Select All
    #************************Step 16******************************
    #  Do:
    #      Select All
    #      Click on Unlock button
    #  Expected:
    #      Unlock success and all regions are removed from this
    #     page
    #************************************************************
    click    css=[data-ng-change="selectAll('region',lockAll.regionSelectAll)"]
    click    css=[data-ng-click="unlock()"]
    Wait For Elements State    //b[.='Only submitted region will list here.']    visible    20

Step ${step} Close The Dialog Check The Dropdown List Of Current
    #************************Step 17******************************
    #  Do:
    #      Close the dialog Check the dropdown list of current
    #     role
    #  Expected:
    #      index php attachments get 0498bff6 7451 4752 a43e
    #     d17fbc5a9c89
    #************************************************************
    click    [data-ng-click="$close()"]   
    Click    //div[@ng-click="toggleDropdown()"]
    Wait For Elements State     //div[contains(text(),'Regional Pricing Manager(EUROPE,NAM,APAC)')]    visible    20
    Sleep    3
    ${color2}    Get Attribute        //div[contains(text(),'Regional Pricing Manager(EUROPE)')]//span     style
    Should Contain    ${color2}     orange
    ${color3}    Get Attribute        //div[contains(text(),'Regional Pricing Manager(NAM)')]//span     style
    Should Contain    ${color3}     orange
    ${color4}    Get Attribute        //div[contains(text(),'Regional Pricing Manager(APAC)')]//span     style
    Should Contain    ${color4}     orange   

Step ${step} Exchange The Role To Region Pricing Manager EUROPE NAM2
    #************************Step 18******************************
    #  Do:
    #      Exchange the role to Region Pricing Manager EUROPE NAM
    #     APAC
    #      Click on UnLock button
    #  Expected:
    #      All countries are listed here
    #      index php attachments get 982c98aa dd68 4f9b a922
    #     656d3c433eb2
    #************************************************************
    click    //div[contains(text(),'Regional Pricing Manager(EUROPE,NAM,APAC)')]
    click    ${Project_RoundMgmt_UnlockButton}
    Sleep    3
    click    //a[.='Country']
    Wait For Elements State    //label[contains(text(),'AU')]        visible    20
    Wait For Elements State    //label[contains(text(),'CN-N')]        visible    20
    Wait For Elements State    //label[contains(text(),'DE')]        visible    20
    Wait For Elements State    //label[contains(text(),'US')]        visible    20

Step ${step} Select All2
    #************************Step 19******************************
    #  Do:
    #      Select All
    #      Click Unlock button
    #  Expected:
    #      Unlock success
    #************************************************************
    click    css=[data-ng-change="selectAll('country',lockAll.countrySelectAll)"]
    click    css=[data-ng-click="unlock()"]
    Wait For Elements State    //b[.='Only submitted country will list here.']    visible    20

Step ${step} Close The Dialog Check The Dropdown List Of Current2
    #************************Step 20******************************
    #  Do:
    #      Close the dialog check the dropdown list of Current
    #     Role
    #  Expected:
    #      index php attachments get 8d81c003 6a95 462a b4a0
    #     9d693fc6463f
    #************************************************************
    click    [data-ng-click="$close()"]   
    Click    //div[@ng-click="toggleDropdown()"]
    Wait For Elements State     //div[contains(text(),'Cluster Head(GREATER CHINA,AU-NZ,DE-CH)')]    visible    20
    Sleep    3
    ${color2}    Get Attribute        //div[contains(text(),'Cluster Head(GREATER CHINA)')]//span     style
    Should Contain    ${color2}     orange
    ${color3}    Get Attribute        //div[contains(text(),'Cluster Head(AU-NZ)')]//span     style
    Should Contain    ${color3}     orange
    ${color4}    Get Attribute        //div[contains(text(),'Cluster Head(DE-CH)')]//span     style
    Should Contain    ${color4}     orange   
    ${color5}    Get Attribute        //div[contains(text(),'Country Pricing Manager(DE)')]//span     style
    Should Contain    ${color5}     orange
    ${color6}    Get Attribute        //div[contains(text(),'Country Pricing Manager(CN-N)')]//span     style
    Should Contain    ${color6}     orange
    ${color7}    Get Attribute        //div[contains(text(),'Country Pricing Manager(AU)')]//span     style
    Should Contain    ${color7}     orange   
    ${color8}    Get Attribute        //div[contains(text(),'Country Pricing Manager(US)')]//span     style
    Should Contain    ${color8}     orange      

Step ${step} Exchange To Any Of The Role
    #************************Step 21******************************
    #  Do:
    #      Exchange to any of the role
    #  Expected:
    #      The Submission button is enable
    #************************************************************
    click    //div[contains(text(),'Regional Pricing Manager(EUROPE,NAM,APAC)')]
    Wait For Elements State     ${Project_RoundMgmt_SubmissionButton}   enabled     20

Step ${step} Exchange Current Role To Project Owner
    #************************Step 22******************************
    #  Do:
    #      Exchange current role to Project Owner
    #      Click on Close Round button
    #      In pop up dialog
    #      Select Send notification to all pricing manager
    #      User clicks yes button
    #  Expected:
    #      1 A prompt says Close Success
    #      2 Current Pricing Round 1 Closed 2 lanes
    #      3 There have new round button and reopen round button
    #************************************************************
    Click    //div[@ng-click="toggleDropdown()"]
    click    //div[contains(text(),'Project Owner')]
    click    ${Project_RoundMgmt_CloseRoundButton}
    click    //span[.='Send notification to all pricing manager.']
    click    ${Project_RoundMgmt_StartConfirmButton} 
    Wait For Elements State    //span[.='Close Success']    visible    20
    Wait For Elements State    //span[.='1 (Closed) 2 lanes']    visible    20
    Wait For Elements State    css=[data-ng-click="newRound()"]    visible    20
    Wait For Elements State    css=[data-ng-click="reopenRound()"]    visible    20

Step ${step} Click On Close Button
    #************************Step 23******************************
    #  Do:
    #      Click on Close button
    #      In Pricing Project page User selects TenderID Contains
    #     20240815
    #  Expected:
    #      The project could be found
    #************************************************************
    CLICK    ${Project_RoundMgmt_CloseButton}
    Wait For Elements State    //td[contains(text(),'${G_TENDERID}')]    visible    20
    close browser
    Set Global Variable    ${USERNAME}    AUTOTEST
    Login Space

Step ${step} Select This Project Click On Delete Project Button
    #************************Step 24******************************
    #  Do:
    #      Select this project click on Delete Project button
    #      Click Yes of the pop up confirm window
    #      If Delete Project button is disable do Data Cleaning
    #     and cancel first and then Delete Project button is
    #     enable
    #  Expected:
    #      System displays Project has been deleted
    #************************************************************
    LOG    in teardown

Step ${step} User Goes To Basic Data Management Tender List2
    #************************Step 25******************************
    #  Do:
    #      User goes to Basic Data Management Tender List
    #      Search out the tender created in step1
    #      Click on Delete button
    #      Click on Yes button in the popup dialog
    #  Expected:
    #      System displays Tender has been deleted
    #************************************************************
    LOG    in teardown

